/**
 * 匠言知识付费v2.0.0
 * Author: 山西匠言网络科技有限公司
 * 这不是一个免费软件，它受限于许可条款，你可以访问https://www.zsfzxkc.cn/获取更多详细信息。
 * This is not a free software, it under the license terms, you can visit https://www.zsffzxkc.cn/ get more details.
 */
<style lang="less">
	.container{
		background-color: #fff;
		font-size: 35upx;
		font-family: SimHei;
		color: #262626;
	}

	.header{
		display: flex;
		justify-content: space-between;
		padding: 30upx;
		align-items: center;
		image{
			width: 17upx;
			height: 30upx;
		}
	}
	.container1{
		&-img1{
			width: 243upx;
			height: 270upx;
			position: absolute;
			top:0;
			left:0;
			image{
				width: 100%;
				height: 100%;
			}
		}
		&-img2{
			width: 218upx;
			height: 350upx;
			position: absolute;
			bottom:150upx;
			right:0;	
			image{
				width: 100%;
				height: 100%;
			}
		}
		.middle{
			margin-top: 100upx;
			width: 100%;
			z-index:99;
			.xieyi{
				display: flex;
				align-items: center;
				justify-content: center;
				font-size: 28upx;
				&-text{
					color: green;
				}
			}
			.xyshow{
				background-color: rgba(9, 9, 9, .6);
				z-index: 9999;
				height:100vh;
				width: 100%;
				position: fixed;
				top:0;
				left: 0;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				.xieyi_scroll{
					width: 80%;
					height: 60%;
					background-color: #FFF;
					display: flex;
					align-items: center;
					justify-content: center;
					border-radius: 10upx;
					padding:20upx 15upx;
				}
				.woyiread{
					button{
						width: 300upx;
						font-size: 28upx;
					}
				}
				.scroll-Y{
					height: 80%;
				}
			}
			&-item{
				display: flex;
				background-color: #e0e5ff;
				width: 75%;
				padding: 30upx 40upx;
				margin: 40upx auto;
				border-radius: 50upx;
				font-size: 30upx;
				
				image{
					width: 32upx;
					height: 40upx;
				}
				input{
					margin-left: 25upx;
				}
				.placeholder{
					font-size: 28upx;
				}
				.code{
					width: 50%;
					border-right: 1upx solid #ccc;
				}
				.getcode{
					text-align: center;
					display: flex;
					align-items: center;
					border: none;
					font-size: 30upx;
					outline: none;
					  border-radius: 0;
					  background-color: transparent;
					  line-height: inherit;
					  width: max-content;
				}
				.getcode:after{
					border: none;
				}
				.class-xie{
					float: left;
					color: #007AFF;
				}
				.class-is{
					float: left;
				}
			}
			.loginbtn{
				font-size: 35upx;
				display: flex;
				align-items: center;
				text-align: center;
				margin-top: 80upx;
				color: #fff;
				background-image: linear-gradient(to right, #a9b7ff , #3e5eff);
				background-size: 100% 100%;
				text{
					margin: 0 auto;
				}
			}
			.info{
				margin-top: 30upx;
				margin-bottom: 30upx;
				text-align: center;
				font-size: 30upx;
			}
			.quanyi{
				font-size: 27rpx;
				text-align: left;
				padding: 18rpx;
			}
			.regbtn{
				color:#3e5eff;
			}
		}
		.bottom{
			margin-top: 160upx;
			.logintype{
				text-align: center;
				font-size: 30upx;
			}
			.wechat-login{
				border: none;
				background-color: transparent;
				outline: none;
				margin-top: 30upx;
				display: flex;
				align-items: center;
				justify-content: center;
				image{
					width: 94upx;
					height: 94upx;
				}
			}
			.wechat-login::after{
				border: none;
				outline: none;
			}
		}
		
	}
</style>

<template>
	<view class="container">
	<jy-quick-btns></jy-quick-btns>
	<view class="header">
		<text> </text>
		<text>注册登录</text>
		<text> </text>
	</view>
	<view class="container1">
		<view class="container1-img1">
			<image src="../../static/top-c1.png" mode="aspectFit"></image>
		</view>
		<view class="container1-img2">
			<image src="../../static/bot-c2.png" mode="aspectFit"></image>
		</view>
		<view class="middle">
			<view class="middle-item">
				<image src="../../static/account-icon.png" mode="aspectFit"></image>
				<input type="text" value="" placeholder="请输入您的手机号" placeholder-class="placeholder" @input="phoneinput"/>
			</view>
			<view class="middle-item" v-if="reg || bindphone || forget || codelogin">
				<image src="../../static/code.png" mode="aspectFit"></image>
				<input class="code" type="text" value="" placeholder="请输入您的验证码" placeholder-class="placeholder" @input="change_code"/>
				<button class="getcode" @click="getcode" :disabled="flag">{{timetext}}</button>
			</view>
			<view class="middle-item" v-if="(!bindphone && !codelogin) || forget || reg">
				<image src="../../static/password-icon.png" mode="aspectFit"></image>
				<input type="password" value="" placeholder="请输入您的登录密码" placeholder-class="placeholder" @input="change_password"/>
			</view>
			<view class="middle-item" v-if="reg">
				<image src="../../static/password-icon.png" mode="aspectFit"></image>
				<input type="password" value="" placeholder="请再次输入您的密码" placeholder-class="placeholder" @input="change_repassword"/>
			</view>
			<view class="middle-item" v-if="reg && base_set.is_pid == 1">
				<image src="../../static/code.png" mode="aspectFit"></image>
				<input type="number" value="" placeholder="请填写推荐人UID(选填项)" placeholder-class="placeholder" @input="change_pid"/>
			</view>
			<!-- 单选 -->
			<view class="xieyi" v-if="reg || bindphone">
				<radio-group @change="radioChange">
					<radio value="1"  class="class-is" :checked="readok" @click="wyreadbtn"/>
				</radio-group>
				<view class="class-is">我已阅读</view>
				<view class="xieyi-text" @click="xieclick('fuwu')">
					服务协议
				</view>
				<view class="class-is">和</view>
				<view class="xieyi-text" @click="xieclick('yinsi')">
					隐私政策
				</view>
			</view>
			<view v-if="xieyishow" class="xyshow">
				<scroll-view  scroll-y="true" class="xieyi_scroll" @scrolltolower = "scrolltolower">
					<jyf-parser :html="xieyicontent" ></jyf-parser>
				</scroll-view>
				<view class="woyiread">
					<button type="primary" @click="readedbtn" :disabled="!readok">我已阅读本协议</button>
				</view>
			</view>
			<view class="middle-item loginbtn" v-if="reg || bindphone || forget" @click="regbtn">
				<text v-if="reg">立即注册</text>
				<text v-if="forget">修改密码</text>
				<text v-if="bindphone">绑定手机号</text>
			</view>
			<view class="middle-item loginbtn" v-if="!reg &&!bindphone && !forget" @click="login">
				<text>立即登录</text>
			</view>
			<view class="info" v-if="reg &&!bindphone">
				<text class="regbtn" @click="login_now">返回登录</text>
			</view>
			<view class="info" v-if="!reg &&!bindphone && !forget">
				<text class="regbtn" @click="notlogin">暂不登录</text>|<text class="regbtn" @click="reg_now">立即注册</text>|<text class="regbtn" @click="forget_pwd">忘记密码?</text>|<text class="regbtn" @click="code_login">短信登录</text>
			</view>
			<view class="info" v-if="bindphone">
				<text style="color: #DD524D;">请您绑定手机号,如手机号已被占用,请点击</text><text class="regbtn" @click="qhzh">切换账号</text>
			</view>
			<view class="quanyi" v-if="bindphone">
				<text>1.绑定手机号后可以享受APP、小程序、H5、PC等十五端版本数据同步</text>
			</view>
			<view class="quanyi" v-if="bindphone">
				<text>2.可以获得{{base_set.bindphone_zsmoney}}元余额奖励，可在全场购物消费</text>
			</view>
			<view class="quanyi" v-if="bindphone">
				<text>3.请您在绑定手机号时仔细阅读用户协议</text>
			</view>
		</view>
		<!-- #ifdef MP-WEIXIN || APP-PLUS || H5-->
		<view class="bottom" v-if="!reg &&!bindphone">
			<view class="logintype">
				更多登录方式
			</view>
			<button class="wechat-login" @click="wxlogin" open-type="getUserInfo">
				<image src="../../static/wechat.png" mode="aspectFit"></image>
			</button>
		</view>
		<!-- #endif -->
		<!-- #ifdef MP-TOUTIAO -->
		<view class="bottom" v-if="!reg &&!bindphone">
			<view class="logintype">
				更多登录方式
			</view>
			<button class="wechat-login" @tap="ttlogin" >
				<image src="../../static/zijie.jpg" mode="aspectFit"></image>
			</button>
		</view>
		<!-- #endif -->
	</view>
	</view>
</template>

<script>
	import jiangyanSelect from "@/components/jiangyan-select/jiangyanSelect.vue";
	import {h5wx_login,mpwx_login,appwx_login,mptt_login} from '@/request/checkUserinfo'
	import jyfParser from "@/components/jyf-parser/jyf-parser";
	export default {
		components:{
			jyfParser,
			jiangyanSelect
		},
		data() {
			return {
				reg:false,
				forget:false,
				codelogin:false,
				phonenum:'',
				code:'',
				password:'',
				repassword:'',
				pid:0,
				flag:false,
				timetext:'获取验证码',
				isChange:'-1',
				list:[],
				bindphone:false,
				xieyishow:false,
				xieyicontent:'',//协议
				fuwucontent:'',//服务协议
				yinsicontent:'',//隐私协议
				base_set:[],
				regset:[],
				options:{},
				class_id:0,
				readok:false,
				timer:null,
				secNum:60
			};
		},
		onShareTimeline(){
			let path = getCurrentPages()
			let path_share = path[0].$page.fullPath
			let path_title = path[0].data.title
			let userinfo = uni.getStorageSync('userinfo')
			let base_set = uni.getStorageSync('base_set')
			var pid;
			if (userinfo.uid == '' || !userinfo.uid) {
				pid = userinfo.uid
			}else{
				pid = 0
			}
			return {
			  title: base_set.share_title,
			  query: 'pid='+pid,
			  imageUrl: base_set.share_icon
			}
		},
		onShareAppMessage(res) {
			// #ifdef MP
			uni.showShareMenu({
			  withShareTicket: true,
			  menus: ['shareAppMessage', 'shareTimeline']
			})
			let path = getCurrentPages()
			let path_share = path[0].$page.fullPath
			let path_title = path[0].data.title
			let userinfo = uni.getStorageSync('userinfo')
			let base_set = uni.getStorageSync('base_set')
			if (userinfo.uid == '' || !userinfo.uid) {
				uni.navigateTo({
					url: '../login/login'
				})
				return {
					title: '请先登录后再分享给好友',
					path: ''
				}
			} else {
				if (res.from === 'button') {

				}
				return {
					title: base_set.share_title,
					path: `${path_share}?pid=${userinfo.uid}`
				}
			}
			// #endif
		},
		onLoad(e) {
			
			var bindphone1=e.bindphone
			if(bindphone1==1){
				this.bindphone=true
			}
			const BASE_URL=uni.BASE_URL
			uni.request({
				url: BASE_URL+'index/user/xieyi',
				data: {},
				method:'POST',
				success:(res) =>{
					console.log(res.data);
					this.fuwucontent = res.data.data.fuwu;
					this.yinsicontent = res.data.data.yinsi;
				},
				fail:(res)=> {
					console.log(res.data);
				}
			});
			this.base_set= uni.getStorageSync('base_set')
		},
		onShow() {
			// #ifdef H5
			var ua = window.navigator.userAgent.toLowerCase();
			if (ua.match(/micromessenger/i) == 'micromessenger') {
				var userinfo = uni.getStorageSync('userinfo')
				// if (!userinfo && !userinfo.userdata) {
				// 	h5wx_login()
				// }
			}
			// #endif
			// #ifndef H5
			var userinfo=uni.getStorageSync('userinfo')
			if(userinfo && userinfo.userdata){
				// if(!this.bindphone){
				// 	uni.navigateTo({
				// 		url:'/pages/index/index'
				// 	})
				// }
			}
			// #endif
		},
		methods: {
			check_apptype(){
				var apptype = '';
				// #ifdef H5
				return apptype = 'H5'
				// #endif
				// #ifdef MP-WEIXIN
				return apptype = 'MP-WEIXIN'
				// #endif
				// #ifdef MP-TOUTIAO
				return apptype = 'MP-TOUTIAO'
				// #endif
				// #ifdef MP-BAIDU
				return apptype = 'MP-BAIDU'
				// #endif
				// #ifdef MP-360
				return apptype = 'MP-360'
				// #endif
				// #ifdef MP-JD
				return apptype = 'MP-JD'
				// #endif
				// #ifdef MP-KUAISHOU
				return apptype = 'MP-KUAISHOU'
				// #endif
				// #ifdef APP-PLUS
				return apptype = 'APP-PLUS'
				// #endif
				// #ifdef MP-ALIPAY
				return apptype = 'MP-ALIPAY'
				// #endif
				// #ifdef MP-LARK
				return apptype = 'MP-LARK'
				// #endif
				// #ifdef QUICKAPP-WEBVIEW
				return apptype = 'QUICKAPP-WEBVIEW'
				// #endif
				// #ifdef MP-QQ
				return apptype = 'MP-QQ'
				// #endif
			},
			radioChange(evt) {
				console.log(evt.detail.value);
				if(evt.detail.value == 1){
					this.readok = true;
				}
			},
			wyreadbtn(){
				if(!this.readok){
					uni.showModal({
						title: '温馨提示',
						content: '请您阅读服务协议和隐私政策',
						showCancel:false,
						success: function (res) {
							if (res.confirm) {
								console.log('用户点击确定');
							}
						}
					});
					this.readok = false;
				}else{
					this.readok = true;
				}
			},
			scrolltolower(e){
				console.log('滚动对象',e);
				if(e.detail.direction == 'bottom'){
					this.readok = true;
				}
			},
			back(){
				uni.navigateBack();
			},
			getValue(index) {
				this.class_id = index
			},
			notlogin(){
				uni.navigateTo({
					url:'../index/index'
				})
			},
			readedbtn(){
				this.xieyishow=false
			},
			xieclick(e) {
				if(e == 'fuwu'){
					this.xieyicontent = this.fuwucontent;
				}else{
					this.xieyicontent = this.yinsicontent;
				}
				this.xieyishow=true
			},
			qhzh(){
				uni.showModal({
				    title: '提示',
				    content: '确定要切换账号吗？',
				    success: function (res) {
				        if (res.confirm) {
									uni.removeStorageSync('userinfo')
									uni.navigateTo({
										url:'/pages/index/index'
									})
								} else if (res.cancel) {
										console.log('用户点击取消');
								}
				    }
				});
			},
			//头条登录
			ttlogin(){
				mptt_login();
			},
			//微信登录
			wxlogin(){
				// #ifdef H5
				var ua = window.navigator.userAgent.toLowerCase();
				if (ua.match(/micromessenger/i) == 'micromessenger') {
					h5wx_login()
				}else{
					uni.showToast({
						title:'非微信浏览器请使用账号密码登录',
						icon:'none',
						duration:2000
					})
				}
				// #endif
				// #ifdef MP-WEIXIN
				mpwx_login()
				// #endif
				// #ifdef APP-PLUS
				appwx_login()
				// #endif
			},
			phoneinput(e){
				this.phonenum=e.detail.value
			},
			reg_now(){
				this.reg=true;
			},
			forget_pwd(){
				this.forget=true;
			},
			login_now(){
				this.reg=false;
			},
			code_login(){
				this.codelogin = true;
				this.reg=false;
			},
			change_code(e){
				this.code=e.detail.value
			},
			change_password(e){
				this.password=e.detail.value
			},
			change_repassword(e){
				this.repassword=e.detail.value
			},
			change_pid(e){
				this.pid=e.detail.value
			},
			login(){
				const BASE_URL=uni.BASE_URL
				var that=this;
				let phone = that.phonenum;
				let password = that.password;
				let code = that.code;
				if(phone==''){
				  uni.showToast({
				      title: '手机号码不能为空',
				      duration: 2000,
					  icon:'none'
				  });
				  return false;
				}
				if(!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(phone))){
				    uni.showToast({
				        title: '手机号码格式不正确,请重试',
				        duration: 2000,
						icon:'none'
				    });
				    return false;
				}
				var apptype = this.check_apptype();
				if(!that.codelogin){
					if(password==''){
					  uni.showToast({
					      title: '密码不能为空',
					      duration: 2000,
						  icon:'none'
					  });
					  return false;
					}
					uni.request({
						url: BASE_URL+'index/user/login',
						data: {
							phone:phone,
							password:password,
							apptype:apptype
						},
						method:'POST',
						success:(res) =>{
							console.log(res.data);
							if(res.data.code=="0"){
								uni.showToast({
									title: res.data.msg,
									duration: 1500
								});
								uni.setStorageSync('userinfo',res.data.data);
								uni.redirectTo({
									url:'../user/user'
								})
							}else{
								uni.showToast({
									title: res.data.msg,
									duration: 2000,
									icon:'none'
								});
							}
						},
						fail:(res)=> {
							console.log(res.data);
						}
					});
				}else{
					if(code==''){
					  uni.showToast({
					      title: '验证码不能为空',
					      duration: 2000,
						  icon:'none'
					  });
					  return false;
					}
					uni.request({
						url: BASE_URL+'index/user/phone_login',
						data: {
							phone:phone,
							code:code,
							apptype:apptype
						},
						method:'POST',
						success:(res) =>{
							console.log(res.data);
							if(res.data.code=="0"){
								uni.showToast({
									title: res.data.msg,
									duration: 1500
								});
								uni.setStorageSync('userinfo',res.data.data);
								// uni.navigateBack({
								// 	delta:1
								// });
								uni.redirectTo({
									url:'../user/user'
								})
							}else{
								uni.showToast({
									title: res.data.msg,
									duration: 2000,
									icon:'none'
								});
							}
						},
						fail:(res)=> {
							console.log(res.data);
						}
					});
				}


			},
			regbtn(){
				const BASE_URL=uni.BASE_URL
				var that=this;
				const userinfo= uni.getStorageSync('userinfo');
				let phone = that.phonenum;
				let code = that.code;
				let password = that.password;
				let repassword = that.repassword;
				if(!this.forget){
					if(!this.readok){
						uni.showModal({
							title: '温馨提示',
							content: '请您阅读服务协议和隐私政策',
							showCancel:false,
							success: function (res) {
								if (res.confirm) {
									console.log('用户点击确定');
								}
							}
						});
						return false;
					}
				}
				if(phone==''){
				  uni.showToast({
				      title: '手机号码不能为空',
				      duration: 2000,
					  icon:'none'
				  });
				  return false;
				}
				if(!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(phone))){
				    uni.showToast({
				        title: '手机号码格式不正确,请重试',
				        duration: 2000,
						icon:'none'
				    });
				    return false;
				}
				if(code==''){
				  uni.showToast({
				      title: '验证码不能为空',
				      duration: 2000,
					  icon:'none'
				  });
				  return false;
				}
				if(that.reg==true){
				if(password==''){
				  uni.showToast({
				      title: '密码不能为空',
				      duration: 2000,
					  icon:'none'
				  });
				  return false;
				}else{
					var  re =/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/;
					if(!re.test(password)){
						uni.showModal({
							title: '提示',
							content: '密码不少于8位且包含大小写字母,数字,特殊符号',
							showCancel:false,
							success: function (res) {
								if (res.confirm) {
									console.log('用户点击确定');
								}
							}
						});
						return false;
					}
				}
				if(repassword==''){
				  uni.showToast({
				      title: '确认密码不能为空',
				      duration: 2000,
					  icon:'none'
				  });
				  return false;
				}else{
					var  re =/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/;
					if(!re.test(repassword)){
						uni.showModal({
							title: '提示',
							content: '密码不少于8位且包含大小写字母,数字,特殊符号',
							showCancel:false,
							success: function (res) {
								if (res.confirm) {
									console.log('用户点击确定');
								}
							}
						});
						return false;
					}
				}
				if(repassword!=password){
				  uni.showToast({
				      title: '两次密码不一致,请重试',
				      duration: 2000,
					  icon:'none'
				  });
				  return false;
				}
				var apptype = this.check_apptype();
				uni.request({
					url: BASE_URL+'index/user/reg',
					data: {
						phone:phone,
						code:code,
						password:password,
						pid:this.pid,
						class_id:this.class_id,
						apptype:apptype
					},
					method:'POST',
					success:(res) =>{
						console.log(res.data);
						if(res.data.code=="0"){
							uni.showToast({
								title: res.data.msg,
								duration: 1500
							});
							setTimeout(function(){
								uni.showModal({
								    title: res.data.msg,
								    content: '是否立即登录？',
								    success: function (res) {
								        if (res.confirm) {
								            console.log('用户点击确定');
											that.reg=false;
								        } else if (res.cancel) {
								            console.log('用户点击取消');
								        }
								    }
								});
							},1500)
						}else{
							uni.showToast({
								title: res.data.msg,
								duration: 2000,
								icon:'none'
							});
						}
					},
					fail:(res)=> {
						console.log(res.data);
					}
				});
				}
				else if(that.bindphone==true){
					uni.request({
						url: BASE_URL+'index/user/bindphone',
						data: {
							uid:userinfo.userdata.id,
							phone:phone,
							code:code,
						},
						method:'POST',
						success:(res) =>{
							console.log(res.data);
							if(res.data.code=="0"){
								uni.showToast({
									title: res.data.msg,
									duration: 1500
								});
								userinfo.phone=phone
								userinfo.userdata = res.data.data
								uni.setStorageSync('userinfo',userinfo)
								// setTimeout(function(){
								// 	uni.navigateBack()
								// },1000)
								uni.redirectTo({
									url:'../user/user'
								})
								
							}else{
								uni.showToast({
									title: res.data.msg,
									duration: 2000,
									icon:'none'
								});
							}
						},
						fail:(res)=> {
							console.log(res.data);
						}
					});
				}
				else if(that.forget==true){
					if(password==''){
					  uni.showToast({
					      title: '密码不能为空',
					      duration: 2000,
						  icon:'none'
					  });
					  return false;
					}else{
						var  re =/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/;
						if(!re.test(password)){
							uni.showToast({
							    title: '密码至少包含大写字母，小写字母，数字，且不少于8位',
							    duration: 2000,
								icon:'none'
							});
							return false;
						}
					}
					uni.request({
						url: BASE_URL+'index/user/forget',
						data: {
							phone:phone,
							code:code,
							password:password
						},
						method:'POST',
						success:(res) =>{
							console.log(res.data);
							if(res.data.code==0){
								uni.showToast({
									title: res.data.msg,
									duration: 1500
								});
								// setTimeout(function(){
								// 	uni.navigateBack()
								// },1000)
								uni.redirectTo({
									url:'../user/user'
								})
							}else{
								uni.showToast({
									title: res.data.msg,
									duration: 2000,
									icon:'none'
								});
							}
						},
						fail:(res)=> {
							console.log(res.data);
						}
					});
				}
			},
			//发送验证码
			getcode(){
				this.flag = true;
				// 防止快速点击获取验证码的按钮而导致内部产生多个定时器导致混乱
				if(this.timer) {
					clearInterval(this.timer);
					this.timer = null;
				}
				var phone = this.phonenum;
				const BASE_URL=uni.BASE_URL
				if(phone==''){
				  uni.showToast({
					  title: '手机号码不能为空',
					  duration: 2000,
					  icon:'none'
				  });
				  return false;
				}
				if(!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(phone))){
					uni.showToast({
						title: '手机号码格式不正确,请重试',
						duration: 2000,
						icon:'none'
					});
					return false;
				}
				uni.request({
					url: BASE_URL+'index/user/sendcode',
					data: {
						phone:phone
					},
					method:'POST',
					success:(res) =>{
						console.log(res.data);
						if(res.data.data.Code=='OK' || res.data.data.code==0){
							uni.showToast({
								title: '已发送',
								duration: 2000
							});
						}
					},
					fail:(res)=> {
						console.log(res.data);
					}
				});
				this.timer = setInterval(()=> {
					this.secNum --;
					this.timetext = this.secNum+' s';
					if(this.secNum <= 0){
						clearInterval(this.timer);
						this.timer = null;
						this.flag = false;
						this.secNum = 60;
						this.timetext = "获取验证码";
						return;
					}
				},1000);
			}
		}
	}
</script>

